/**
 *
 * @author Gabriel
 */
//<editor-fold defaultstate="collapsed" desc="comment">
package trbg2;
//</editor-fold>
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class GerenteDeConexao {
    private Connection conexao;
    private String driver="com.mysql.jdbc.Driver";
    private String url="jdbc:mysql://localhost:3306/bibliotecag2";
    private String usuario="root";
    private String senha="root";
    
    public  GerenteDeConexao(){
        try{
            Class.forName(driver);
            conexao  = DriverManager.getConnection(url,usuario,senha);
        }catch(ClassNotFoundException e){
            e.printStackTrace();
        }catch(SQLException e){
            e.printStackTrace();
        }
    }
    public Connection getConexao(){
        
        return conexao;
    }
}
